package com.kldy8.kldyw.filmfactory.dteam.bean;

import android.util.Log;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/9/26.
 */
public class Roles
{
    public String name;
    public String type;
    public String gender;
    public String participant;

    @Override
    public String toString() {
        return "Roles{" +
                "name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", gender='" + gender + '\'' +
                ", participant='" + participant + '\'' +
                '}';
    }

    public static Roles resolution(JSONObject jsonObject)
    {

        if (jsonObject == null)
        {
            return  null;
        }

        Roles m_new = new Roles();
        m_new.name = jsonObject.optString("name");
        m_new.type = jsonObject.optString("type");
        m_new.gender = jsonObject.optString("gender");
        m_new.participant = jsonObject.optString("participant");

        Log.e("jsonObject:",jsonObject.toString());

        Log.e("Roles:",m_new.toString());

        return m_new;
    }
}
